

    \filetitle{autocaption}{Create captions for graphs of model variables or parameters}{model/autocaption}

	\paragraph{Syntax}

\begin{verbatim}
C = autocaption(M,X,Template,...)
\end{verbatim}

\paragraph{Input arguments}

\begin{itemize}
\item
  \texttt{M} {[} model {]} - Model object.
\item
  \texttt{X} {[} cellstr \textbar{} struct \textbar{} poster {]} - A
  cell array of model names, a struct with model names, or a
  \href{poster/Contents}{\texttt{poster}} object.
\item
  \texttt{Template} {[} char {]} - Prescription for how to create the
  caption; see Description for details.
\end{itemize}

\paragraph{Output arguments}

\begin{itemize}
\tightlist
\item
  \texttt{C} {[} cellstr {]} - Cell array of captions, with one for each
  model name (variable, shock, parameter) found in \texttt{X}, in order
  of their appearance in \texttt{X}.
\end{itemize}

\paragraph{Options}

\begin{itemize}
\item
  \texttt{\textquotesingle{}corr=\textquotesingle{}} {[} char \textbar{}
  \emph{\texttt{\textquotesingle{}Corr\ \$shock1\$\ X\ \$shock2\$\textquotesingle{}}}
  {]} - Template to create \texttt{\$descript\$} and \texttt{\$alias\$}
  for correlation coefficients based on \texttt{\$descript\$} and
  \texttt{\$alias\$} of the underlying shocks.
\item
  \texttt{\textquotesingle{}std=\textquotesingle{}} {[} char \textbar{}
  \emph{\texttt{\textquotesingle{}Std\ \$shock\$\textquotesingle{}}} {]}
  - Template to create \texttt{\$descript\$} and \texttt{\$alias\$} for
  std deviation based on \texttt{\$descript\$} and \texttt{\$alias\$} of
  the underlying shock.
\end{itemize}

\paragraph{Description}

The function \texttt{autocaption} can be used to supply user-created
captions to title graphs in \texttt{grfun/plotpp},
\texttt{grfun/plotneigh}, \texttt{model/shockplot}, and
\texttt{dbase/dbplot}, through their option
\texttt{\textquotesingle{}caption=\textquotesingle{}}.

The \texttt{Template} can contain the following substitution strings:

\begin{itemize}
\item
  \texttt{\$name\$} -- will be replaced with the name of the respective
  variable, shock, or parameter;
\item
  \texttt{\$descript\$} -- will be replaced with the description of the
  respective variable, shock, or parameter;
\item
  \texttt{\$alias\$} -- will be replaced with the alias of the
  respective variable, shock, or parameter.
\end{itemize}

The options \texttt{\textquotesingle{}corr=\textquotesingle{}} and
\texttt{\textquotesingle{}std=\textquotesingle{}} will be used to create
\texttt{\$descript\$} and `\(alias\) for std deviations and
cross-correlations of shocks (which cannot be created in the model
code). The options are expected to use the following substitution
strings:

\begin{itemize}
\item
  \texttt{\textquotesingle{}\$shock\$\textquotesingle{}} -- will be
  replaced with the description or alias of the underlying shock in a
  std deviation;
\item
  \texttt{\textquotesingle{}\$shock1\$\textquotesingle{}} -- will be
  replaced with the description or alias of the first underlying shock
  in a cross correlation;
\item
  \texttt{\textquotesingle{}\$shock2\$\textquotesingle{}} -- will be
  replaced with the description or alias of the second underlying shock
  in a cross correlation.
\end{itemize}

\paragraph{Example}


